fo = open("xiaofei.csv","r")
ls0 = []
for line in fo:
    line = line.replace("\n","")
    ls0.append(line.split(","))

line = input("请输入你要查询的城市和项目，以逗号分隔：\n")
ls1 = line.split(",")
k = []
for i in ls0:
    if ls1[0] == i[0]:
        k = i
ls2 = []
for j in ls1[1:]:
    t = ls0[0].index(j)
    ls2.append(t)
print("你输入的城市是：{}".format(ls1[0]))
for s in ls2:
    print("{}的消费金额为：{}".format(ls0[0][s], k[s]))
fo.close()